export const constantRoute = [
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录',
      hidden: true, //是否需要隐藏
      icon: 'Promotion',
    },
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '',
      hidden: false,
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
    },
  },
]

//异步路由
export const asnycRoute = [
  //权限
  {
    path: '/acl',
    component: () => import('@/layout/index.vue'),
    name: 'Acl',
    meta: {
      title: '权限管理',
      icon: 'lock',
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: () => import('@/views/acl/user/index.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          icon: 'User',
        },
      },
      {
        path: '/acl/role',
        component: () => import('@/views/acl/role/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          icon: 'UserFilled',
        },
      },
      {
        path: '/acl/permission',
        component: () => import('@/views/acl/permission/index.vue'),
        name: 'Permission',
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Grid',
        },
      },
    ],
  },
  //会议管理
  {
    path: '/meeting',
    component: () => import('@/layout/index.vue'),
    name: 'Meeting',
    meta: {
      title: '会议室管理',
      icon: 'View',
    },
    redirect: '/meeting/book',
    children: [
      // {
      //   path: '/meeting/book',
      //   component: ()=>import('@/views/meeting/book/index.vue'),
      //   name: 'Book',
      //   meta:{
      //   title: '会议室预约',
      //   icon: 'House'
      //   },
      // },
      {
        path: '/meeting/room',
        component: () => import('@/views/meeting/room/index.vue'),
        name: 'Room',
        meta: {
          title: '会议室信息',
          icon: 'List',
        },
      },
      // {
      //   path: '/meeting/meetingmember',
      //   component: ()=>import('@/views/meeting/meetingmember/index.vue'),
      //   name: 'Meetingmember',
      //   meta:{
      //   title: '会议成员',
      //   icon: 'List'
      //   },
      // },
    ],
  },
  {
    path: '/manage',
    component: () => import('@/layout/index.vue'),
    name: 'Manage',
    meta: {
      title: '会议管理',
      icon: 'Reading',
    },
    redirect: '/manage/book',
    children: [
      {
        path: '/manage/book',
        component: () => import('@/views/manage/book/index.vue'),
        name: 'Book',
        meta: {
          title: '会议预约',
          icon: 'House',
        },
      },
      {
        path: '/manage/meetinglist',
        component: () => import('@/views/manage/meetinglist/index.vue'),
        name: 'Meetinglist',
        meta: {
          title: '会议列表',
          icon: 'House',
        },
      },
      {
        path: '/manage/examine/approve',
        component: () => import('@/views/manage/examine/approve/index.vue'),
        name: 'Approve',
        meta: {
          title: '已审核',
          icon: 'House',
        },
      },
      {
        path: '/manage/examine/fail',
        component: () => import('@/views/manage/examine/fail/index.vue'),
        name: 'Fail',
        meta: {
          title: '未审核',
          icon: 'House',
        },
      },
    ],
  },
  {
    path: '/department',
    component: () => import('@/layout/index.vue'),
    name: 'Department',
    meta: {
      title: '部门管理',
      icon: 'OfficeBuilding',
    },
    redirect: '/department/departmentlist',
    children: [
      // {
      //   path: '/department/meetinglist',
      //   component: () => import('@/views/department/meetinglist/index.vue'),
      //   name: 'Meetinglist',
      //   meta: {
      //     title: '部门会议(暂定)',
      //     icon: 'Monitor'
      //   },
      // },
      {
        path: '/department/departmentlist',
        component: () => import('@/views/department/departmentlist/index.vue'),
        name: 'Departmentlist',
        meta: {
          title: '部门列表',
          icon: 'List',
        },
      },
      {
        path: '/department/departmentmember',
        component: () =>
          import('@/views/department/departmentmember/index.vue'),
        name: 'Departmentmember',
        meta: {
          title: '部门成员',
          icon: 'UserFilled',
        },
      },
    ],
  },
]
export const anyRoute = [
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
    },
  },
]
